package com.function;

import java.util.function.Predicate;

public class PredicateTest {
    public static void main(String[] args) {
        Predicate<String> predicate = new Predicate<String>() {
            @Override
            public boolean test(String s) {
                return s != null && !"".equals(s.trim()) && s.length() >= 5;
            }
        };
        System.err.println(predicate.test("jhktyopkl"));
        //
        Predicate<String> predicate2=s->s != null && !"".equals(s.trim()) && s.length() >= 5;
    }
}
